package com.axc.gallery2.edit.effective;

import android.graphics.Bitmap;
import android.graphics.Matrix;

public class ToZoomPercentage {
	public Bitmap ProcessImage(Bitmap bitmap, float f) {

		int width = bitmap.getWidth();
		int height = bitmap.getHeight();
		Matrix matrix = new Matrix();
		float scalewidth = f;
		float scalheight = f;
		matrix.postScale(scalewidth, scalheight);// 對圖片進行縮放處理
		// 获取处理后的图片再返回
		Bitmap newbitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height,
				matrix, true);
		return newbitmap;
	}
}
